package com.lottery.ruok.lottrey.chat.activity;

import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.ActionBar;
import android.view.View;
import android.widget.FrameLayout;

import com.lottery.ruok.lottrey.R;
import com.lottery.ruok.lottrey.chat.base.BaseChatActivity;

import butterknife.BindView;
import io.rong.imkit.fragment.ConversationListFragment;
import io.rong.imlib.model.Conversation;

/**
 * 会话列表（暂时没用）
 */
public class ConversationListActivity extends BaseChatActivity {


    @Override
    protected void init() {

    }

    @Override
    protected void initView() {
        setContentView(R.layout.conversationlist);
        ConversationListFragment mConversationListFragment = new ConversationListFragment();
        FragmentManager fm = getSupportFragmentManager();
        FragmentTransaction ft = fm.beginTransaction();
        ft.replace(R.id.fl_conversionList, mConversationListFragment);
        ft.commit();



        Uri uri;

        uri = Uri.parse("rong://" + getApplicationInfo().packageName).buildUpon()
                .appendPath("conversationlist")
                .appendQueryParameter(Conversation.ConversationType.PRIVATE.getName(), "false") //设置私聊会话是否聚合显示
                /*.appendQueryParameter(Conversation.ConversationType.GROUP.getName(), "false")//群组
                .appendQueryParameter(Conversation.ConversationType.PUBLIC_SERVICE.getName(), "false")//公共服务号
                .appendQueryParameter(Conversation.ConversationType.APP_PUBLIC_SERVICE.getName(), "false")//订阅号
                .appendQueryParameter(Conversation.ConversationType.SYSTEM.getName(), "false")//系统*/
                .build();
        mConversationListFragment.setUri(uri);
    }

    @Override
    protected void load() {

    }

}